<script>
  export default {
    onLaunch: function() {
      // #ifdef APP-PLUS
      plus.screen.lockOrientation('portrait-primary');
      const dom = weex.requireModule('dom');
      dom.addRule('fontFace', {
        'fontFamily': "graceIconfont",
        'src': "url('/static/font/grace.ttf')"
      });
      // #endif


      uni.getSetting({
        success: (res) => {
          if (!res.authSetting['scope.writePhotosAlbum']) {
            uni.authorize({
              scope: 'scope.writePhotosAlbum',
              success: () => {
                console.log('用户已授权')
              },
              fail: () => {
                console.log('用户拒绝授权')
              }
            })
          }
        }
      })

      // 进入的时候清楚 userInfos
      uni.removeStorageSync('userInfo')
      uni.clearStorageSync()
    },
    onShow: function() {

    },
    onHide: function() {}
  }
</script>
<style lang="scss">
  /* 加载框架核心样式 */
  @import "./Grace6/css/grace.scss";
  /* 加载深色模式适配样式 */
  @import "./Grace6/css/graceDark.scss";
  /* 加载自定义样式 */
  @import "./custom/custom.scss";

  /* 加载图标字体 - 条件编译模式 */
  /* #ifdef APP-PLUS-NVUE */
  .gui-icons {
    font-family: graceIconfont;
  }

  /* #endif */
  /* #ifndef APP-NVUE */
  // page {
  // 	// background: #F8F8F8;

  // }
  page {
    width: 100%;
    height: 100%;
    background-color: #fff;
  }

  .container {
    height: 100%;
  }

  /* #endif */
</style>
